import java.awt.Container;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.FileNotFoundException;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JWindow;


public class KaonaGame 
{
	
	public static void start() throws FileNotFoundException
	{
	    String dictionary = "dictionary3.txt"; 
	    GUI myGui;
	    Game myGame;
	    JFrame frame;
	    Toolkit toolkit;
	    Dimension scr;
	    Container pane;
	    int scrX;
	    int scrY;
	    char[] alphabet = {'a', 'u', 'k', 'i'};
        
	    myGame = new Game(dictionary, 9, alphabet);
	    myGui = new GUI(myGame);
    
        frame = new JFrame ("Kaona Hawaiian Word Search");
        frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

        pane  = frame.getContentPane();
        pane.add(myGui);

        frame.pack();
        frame.setVisible (true);
        frame.setResizable(false);
        
        toolkit = frame.getToolkit(); 
        scr = toolkit.getScreenSize();

        scrX  = (int) (scr.width  -  frame.getWidth()) / 2;
        scrY  = (int) (scr.height -  frame.getHeight()) / 2;

        frame.setLocation(scrX, scrY);
	}
	
	public static void main(String[] args) throws FileNotFoundException
	{
	     String imageFile = "Kaona.png";
         new SplashScreen(imageFile);
	}

}
